<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="徐小明：周三操作策略_徐小明_热浪博客,徐小明,徐小明,微信号：投资明道,id：sinaxxm,交易师,股票" />
    <meta name="description" content="徐小明：周三操作策略_徐小明_热浪博客,徐小明," />
    <meta name="keywords" content="徐小明：周三操作策略_徐小明_云博客,徐小明,徐小明,微信号：投资明道,id：sinaxxm,交易师,股票" />
    <meta name="description" content="徐小明：周三操作策略_徐小明_热浪web博客,徐小明," />
    <meta http-equiv="mobile-agent" content="format=html5; url=http://blog.sina.cn/dpool/blog/s/blog_4d89b8340102z7ph.html?vt=4">
    <meta http-equiv="mobile-agent" content="format=wml; url=http://blog.sina.cn/dpool/blog/ArtRead.php?nid=4d89b8340102z7ph&vt=1">
    <script type="text/javascript">
        try{
            document.execCommand("BackgroundImageCache", false, true);
        }catch(e){}
    </script>
    <![endif]–>
    <script type="text/javascript">
        window.staticTime=new Date().getTime();
    </script>
    <link rel="pingback" href="http://upload.move.blog.sina.com.cn/blog_rebuild/blog/xmlrpc.php" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://upload.move.blog.sina.com.cn/blog_rebuild/blog/xmlrpc.php?rsd" />
    <link href="http://blog.sina.com.cn/blog_rebuild/blog/wlwmanifest.xml" type="application/wlwmanifest+xml" rel="wlwmanifest" />
    <link rel="alternate" type="application/rss+xml" href="http://blog.sina.com.cn/rss/1300871220.xml" title="RSS" />
    <link href="http://simg.sinajs.cn/blog7style/css/conf/blog/article.css" type="text/css" rel="stylesheet" /><link href="http://simg.sinajs.cn/blog7style/css/common/common.css" type="text/css" rel="stylesheet" /><link href="http://simg.sinajs.cn/blog7style/css/blog/blog.css" type="text/css" rel="stylesheet" /><link href="http://simg.sinajs.cn/blog7style/css/module/common/blog.css" type="text/css" rel="stylesheet" /><style id="tplstyle" type="text/css">@charset "utf-8";@import url("http://simg.sinajs.cn/blog7newtpl/css/5/5_17/t.css");
</style>
    <style id="positionstyle"  type="text/css">
        .sinabloghead .blogtoparea{ left:127px;top:48%;}
        .sinabloghead .blognav{ left:107px;top:82.5%;}
    </style>
    <style id="bgcolor"  type="text/css">
        body{background-color: #fffbd9;}
    </style>
    <style id="bgtyle"  type="text/css">
        body{background-image:none;}.sinabloga{ background-image:none; }
        .sinablogb{ background-image: url(http://s6.sinaimg.cn/orignal/4d89b834h7a5bb3fca505); }
        .sinablogb{ background-repeat:repeat-x; background-position:center top;}
    </style>
    <style id="headtyle"  type="text/css">
    </style>
    <style id="navtyle"  type="text/css">
    </style>
    <script type="text/javascript" src="http://d1.sina.com.cn/litong/zhitou/sspnew.js"></script>
    <script src="/js/jquery-1.8.0.js"></script>
    <script src="/layer/layer.js"></script>

    <script  type="text/javascript">
       $(function(){
           sessionStorage.setItem("FirstLoad", "0");
          // history.back();
       })
    </script>
</head>
<body>
<input hidden="hidden" id="userid" th:value="${session.user?.bzid}">
<input hidden="hidden" id="userAccout" th:value="${session.user?.userAccout}">
<input hidden="hidden" id="userimg" th:value="${session.user?.img}">
<input hidden="hidden" id="bzid" th:value="${session.user?.bzid}">
<input hidden="hidden" id="status" th:value="${session.user?.status}">
<input hidden="hidden" id="username" th:value="${session.user?.bzname}">
<input type="hidden" id="authorId" >
<input type="hidden" id="nameId" >
<!--$sinatopbar-->
<div style="z-index:512;" class="nsinatopbar">
    <div style="position:absolute;left:0;top:0;" id="trayFlashConnetion"></div>
    <div class="ntopbar_main">
        <input type="hidden" th:value="${session.hy}" id="huiyuan">  <span  id="span1">[[${session?.msgUser}]]</span> <span  id="span2"></span>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/view/toView?view=SinaHomePage">微博首页</a>
        <div class="ntopbar_floatL">
            <div class="ntopbar_search" id="traySearchBar"></div>
            <div class="ntopbar_ad" id="loginBarActivity" style="display:none;"></div>
        </div>
        <div class="ntopbar_loading"></div>
    </div>
</div>
<!--主题内容开始 -->
<div class="sinablogbody" id="sinablogbody">
    <div id="blogads" style="display: none;" class="blogads" uid="1300871220" formatInfo="1"><div class="ad_head"></div><div class="ad_body"><div id="adversite_top" class="adsle">
    </div><div class="adsrig">热浪广告共享计划></div><div class="clearit"></div></div><div class="ad_foot"></div></div>

    <!--第一列start-->
    <div id="column_1" class="SG_colW21 SG_colFirst"><div class="SG_conn" id="module_901">
        <div class="SG_connHead">
            <span class="title" comp_title="个人资料">个人资料</span>
            <span class="edit">
                        </span>
        </div>
        <div class="SG_connBody">
            <div class="info">

                <div class="info_img" id="comp_901_head"><img id="authorImg" real_src ="http://p5.sinaimg.cn/1300871220/180/1"  width="180" height="180" /></div>

                <div class="info_txt">
                    <div class="info_nm">
                        <img id="comp_901_online_icon" style="display:none;" class="SG_icon SG_icon1" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" width="15" height="15" align="absmiddle" />
                        <span class="SG_txtb"><strong id="ownernick"><span id="mingzi"></span>              <a href="#" target="_blank"><img class="SG_icon SG_icon146" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" width="15" height="15" title="热浪个人认证" alt="热浪个人认证" align="absmiddle" /></a>                </strong></span>

                        <div class="clearit"></div>
                    </div>
                    <div class="info_btn1">
                        <a target="_blank" href="#" class="SG_aBtn SG_aBtn_ico"><cite><img class="SG_icon SG_icon51" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" width="15" height="15" align="absmiddle" />微博</cite></a>
                        <div class="clearit"></div>
                    </div>
                    <div class="SG_j_linedot"></div>        <div class="info_locate" id = "info_locate_id">
                    <div class="SG_j_linedot"></div>
                    <div class="info_btn2">
                        <p>
                            <a href="javascript:void(0);" class="SG_aBtn " id="comp901_btn_invite"><cite >加好友</cite></a>
                            <a href="javascript:void(0);" class="SG_aBtn" id="comp901_btn_sendpaper"><cite >发纸条</cite></a>
                        </p>
                        <p>
                            <a href="http://blog.sina.com.cn/s/profile_1300871220.html#write" class="SG_aBtn"   id="comp901_btn_msninfo"><cite>写留言</cite></a>
                            <a href="#" onclick="return false;" class="SG_aBtn"  id="comp901_btn_follow"><cite onclick="Module.SeeState.add()">加关注</cite></a>
                        </p>
                        <div class="clearit"></div>
                    </div>
                    <div class="SG_j_linedot"></div>
                </div>
                    <div class="info_list">
                        <ul class="info_list1">
                            <li><span class="SG_txtc">博客等级：</span><span id="comp_901_grade"><img src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" real_src="http://simg.sinajs.cn/blog7style/images/common/number/9.gif"  /><img src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" real_src="http://simg.sinajs.cn/blog7style/images/common/number/8.gif"  /></span></li>
                            <li><span class="SG_txtc">博客积分：</span><span id="comp_901_score"><strong>0</strong></span></li>
                        </ul>
                        <ul class="info_list2">
                            <li>博客访问：<span class="SG_txtc" id="spanfw"></span></li>
                            <li>关注人气：<span class="SG_txtc" id="spanrq"></span></li>
                            <li>获赠金笔：<span class="SG_txtc" id="spanjb"></span></li>
                            <li>赠出金笔：<span class="SG_txtc" id="spanjb2"></span></li>
                            <li class="lisp" id="comp_901_badge"><span class="SG_txtc">荣誉徽章：</span></li>
                        </ul>
                    </div>
                    <div class="clearit"></div>
                </div>
                <div class="clearit"></div>
            </div>
        </div>
        <div class="SG_connFoot"></div>
    </div>
        <div class="SG_conn " id="module_909">
            <div class="SG_connHead">
                <span class="title" comp_title="其他的博主">其他的博主</span>
                <span class="edit"></span>
            </div>
            <div class="SG_connBody">
                <div class="pic_s1"><a target="_blank" href="#"><img src="http://simg.sinajs.cn/blog7style/images/widget/cmt_banner_s.jpg" /></a></div>
                <div class="cmtA_tip"><a suda-uatrack="key=blog_btjblog&value=h_btjblog" target="_blank" href="#"><span name='jjkj'></span></a>的这篇博文被推荐到<a suda-uatrack="key=blog_btjblog&value=h_btjblog" target="_blank" href="#">热浪web博客</a></div><div class="SG_j_linedot cmtA_line"></div><div class="cmtA_tit">其他的博主：</div>
                <ul class="onlylist cmtA_arti" id="xiangGuan" >

                </ul>
                <div class="more1">
                    <span class="SG_more"><a target="_blank" href="#">全部推荐博文</a>>></span><br/>
                    <span class="SG_more"><a target="_blank" href="#">如何获得更多推荐?</a></span><br/>

                </div>    </div>
            <div class="SG_connFoot"></div>
        </div>
        <div id="module_903" class="SG_conn ">
            <div class="SG_connHead">
                <span comp_title="相关博文" class="title">相关博文</span>

                <!--从数据库里动态查询时间最近的博文放到edit-->

                <span class="edit"> </span>
            </div>
            <div class="SG_connBody">
                <div class="atcTitList relaList">        <ul class="">

                    <li class="SG_j_linedot1" style="display:none;">
                        <p id="atcTitLi_SLOT_41" class="atcTitCell_tit SG_dot" style="display:none">
                        </p>
                    </li>
                    <li class="SG_j_linedot1" style="display:none;">
                        <p id="atcTitLi_SLOT_42"  class="atcTitCell_tit SG_dot" style="display:none">
                        </p>
                    </li>

                </ul>
                    <div class="atcTit_more"><span class="SG_more"><a href="#" target="_blank">更多&gt;&gt;</a></span></div></div>    </div>
            <div class="SG_connFoot"></div>
        </div>
        <div id="module_904_top_ad"></div>
        <div class="SG_conn " id="module_904">
            <div class="SG_connHead">
                <span class="title">推荐博文</span>
            </div>
            <div class="SG_connBody ">
                <div class="atcTitList relaList">
                    <ul class="">
                    </ul>
                    <div id="atcPicList">
                    </div>
                    <div class="atcTit_more"><span class="SG_more"><a target="_blank" href="#">查看更多</a>&gt;&gt;</span></div></div></div>
            <div class="SG_connFoot"></div>
        </div>
    </div>
    <!--第一列end-->

    <!--第二列start-->
    <div id="column_2" class="SG_colW73">
        <div id="module_920" class="SG_conn">
            <div class="SG_connHead">
                <span comp_title="正文" class="title">正文</span>
                <span class="edit"><span id="articleFontManage" class="fontSize">字体大小：<a href="javascript:void(0);" onclick="changeFontSize(2);return false;">大</a> <strong>中</strong> <a href="javascript:void (0);" onclick="changeFontSize(0);return false;">小</a></span></span>
            </div>
            <div class="SG_connBody">
                <!--博文正文 begin -->
                <div id="articlebody" class="artical" favMD5='{"4d89b8340102z7ph":"4f97bcbd690de05f8eb2c5bafb06cda8"}'>
                    <div class="articalTitle">

						<span class="img1">
					<a href="#" target ="_blank"><img class="SG_icon SG_icon107" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" width="18" height="18" title="已推荐到博客首页，点击查看更多精彩内容" align="absmiddle" /></a>
			</span>
                        <!--从上一个页面点击时候传过来数据 -->
                        <h2 id="t_4d89b8340102z7ph" class="titName SG_txta"><span name="jjkj"></span> ：<span id="bkname"></span> </h2>

                        <span class="img2">
				<img width="15" height="15" align="absmiddle" title="此博文包含图片" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" class="SG_icon SG_icon18"/>
			</span>
                        <span class="time SG_txtc">(2019-03-05 16:52:15)</span><div class="turnBoxzz"><a href="javascript:void(0);" class="SG_aBtn SG_aBtn_ico SG_turn"  action-type="reblog" action-data="{srcBlog:1, blogId:'4d89b8340102z7ph'}"><cite><img class="SG_icon SG_icon111" src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif" width="15" height="15" align="absmiddle">转载<em class="arrow">▼</em></cite></a></div>		</div>
                    <div class="articalTag" id="sina_keyword_ad_area">

                    </div>
                    <!-- 正文开始 -->
                    <div id="sina_keyword_ad_area2" class="articalContent   newfont_family">
                        <p><span STYLE="font-family:宋体;mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin;mso-fareast-font-family:宋体;mso-fareast-theme-font: minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin">
                          </SPAN></P>
                        <p><span><font STYLE="font-size: 18px;">&nbsp;<wbr></FONT></SPAN></P>
                        <p><font STYLE="font-size: 18px;"><span>&nbsp;<wbr>&nbsp;<wbr>&nbsp;<wbr></SPAN>
                            <span STYLE="font-family:宋体;mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin; mso-fareast-font-family:宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family: Calibri;mso-hansi-theme-font:minor-latin"></span>

                        <input type="hidden" th:value="${name}" id="ms">
                        <input type="hidden" th:value="${biaoMing}" id="mg">
                        <div id="div"></div>
                        </font>
                    </div>
                    <!-- 正文结束 -->
                    <div id='share' class="shareUp nor">
                        <div class="share SG_txtb clearfix">
                            <span class="share-title">分享：</span>
                            <div class="bshare-custom" style="display:inline;margin-left:5px;">
                            </div>
                        </div>
                        <div class="up">
                            <div title="喜欢后让更多人看到" id="dbox_4d89b8340102z7ph" class="upBox upBox_click"
                                 style="cursor: pointer;">
                                <p ti_title="<span name='jjkj'></span>：<span id='bkname'></span> "
                                   id="dbox2_4d89b8340102z7ph" class="count"></p>
                                <p class="link"><img width="15" height="15" align="absmiddle"
                                                     src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif"
                                                     class="SG_icon SG_icon34">喜欢</p>
                            </div>

                            <div class="upBox upBox_add">
                                <p class="count" id="goldPan-num">0</p>
                                <p class="link" id="goldPan-give"><img class="SG_icon SG_icon214"
                                                                       src="http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif"
                                                                       width="20" height="16" title="赠金笔"
                                                                       align="absmiddle">赠金笔</p>
                            </div>

                        </div>
                        <div class="clearit"></div>
                    </div>
                    <div class="articalInfo">
                        <!-- 分享到微博 {$t_blog} -->
                        <div class="IL">

                        </div>
                        <div class="IR">
                            <table>
                                <tr>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="clearit"></div>
                    <div class="blogzz_zzlist borderc" id="blog_quote" style="display:none">加载中，请稍候......</div>
                    <div class="articalfrontback SG_j_linedot1 clearfix" id="new_nextprev_4d89b8340102z7ph">
                        <div><span class="SG_txtb">前一篇：</span><a
                                href="http://blog.sina.com.cn/s/blog_4d89b8340102z7pa.html">获取：获取</a></div>
                    </div>
                    <div class='tagMore'>
                        <div>
                            <a id='r_10001_76137ff801019g0p' href='http://blog.sina.com.cn/s/blog_76137ff801019g0p.html'
                               target='_blank'>阅读</a>&nbsp;
                            &nbsp;<a target='_blank' href='http://blog.sina.com.cn/s/blog_76137ff801019g0p.html#comment'
                                     id='c_10001_76137ff801019g0p'>评论</a>&nbsp;┆&nbsp;<a href='#'
                                                                                         onclick="scope.articel_quote_alert && scope.articel_quote_alert('76137ff801019g0p');return false;">转载</a>
                            ┆&nbsp;<a id='f_10001_76137ff801019g0p' href='javascript:;' onclick='return false;'>收藏</a>&nbsp;
                        </div>
                    </div>
                    评论:
                    <br>
                    <div id="showpinglun">

                    </div>
                    <div style='margin-top:10px;background-color: #fff9ec'>
                      <textarea rows="10px" cols="93px" id="pingtext">


                      </textarea>
                        <center>
                            <button onclick="fabu()">发布评论</button>
                        </center>
                    </div>

                </div>

            </div>

        </div>
    </div>
    <!--第二列start-->

    <!--第三列start-->
    <div id="column_3" class="SG_colWnone"><div style="width:0px;height:0.1px;margin:0px;">&nbsp;&nbsp;</div></div>
    <!--第三列end-->


</div>
<!--主题内容结束 -->


<div id="diggerFla" style="position:absolute;left:0px;top:0px;width:0px"></div>
<div class="sinablogfooter" id="sinablogfooter"  style="position:relative;">

    <p class="SG_linka"><a href="#/" target="_blank">热浪BLOG意见反馈留言板</a>　电话：10086 提示音后按1键（按当地市话标准计费）　欢迎批评指正</p>

    <p class="SG_linka"><a href="#" target="_blank">热浪简介</a> | <a href="#" target="_blank">About Sina</a> | <a href="http://emarketing.sina.com.cn/" target="_blank">广告服务</a> | <a href="http://www.sina.com.cn/contactus.html" target="_blank">联系我们</a> | <a href="http://corp.sina.com.cn/chn/sina_job.html" target="_blank">招聘信息</a> | <a href="http://www.sina.com.cn/intro/lawfirm.shtml" target="_blank">网站律师</a> | <a href="http://english.sina.com" target="_blank">SINA English</a> | <a href="http://members.sina.com.cn/apply/" target="_blank">会员注册</a> | <a href="http://help.sina.com.cn/" target="_blank">产品答疑</a> </p>
    <p class="copyright SG_linka"> Copyright &copy; 1996 - 2018 SINA Corporation,  All Rights Reserved</p>
    <p class="SG_linka"> 热浪公司 <a href="#" target="_blank">版权所有</a></p>
    <a href="#"  target="_blank" class="gab_link"></a>
</div>
</div>
</div>
<div id="swfbox"></div>


</body>
<script type="text/javascript" th:inline="none">

    $(function(){
        queryXqing();
        querybkcount();
        getBoo();

        var id=$("#authorId").val();

        if(id!=null&&id!=""){
            queryAuthor(id);
            querynoAuthor(id);
        }
        //登录
        zhanshi();

    })

    function  zhanshi(){

        var huiyuan = $("#huiyuan").val();
        var  msg = $("#span1").html();

        if(huiyuan==2){
            $("#span1").html("<font size='3px' color='red'>会员 "+msg+"</font>");
        }else if(huiyuan==3){
            $("#span1").html("<font size='4px' color='blue'> 超级会员 "+msg+"</font>");
        }

        if(msg!=null && msg!=""){
            $("#span2").html("<a href='/login/removeSession'>注销</a>");
        }else{
            $("#span2").html("<a href='/login/login?login=login'>登录</a>");
        }

    }


    function getBoo(){
        var id=$("#ms").val();
        var table=$("#mg").val();
        $.ajax({
            url:"/boo/getBoo",
            type:"POST",
            data:{id:id,name:table},
            success:function(text){
              $("[name='jjkj']").html(text.bzname);
              $("#bkname").html(text.bkname);
            },
            error:function(){
                alert("失败了");
            }
        });

    }


    function querynoAuthor(id){


        $.ajax({
            url:"/user/querynoAuthor",
            type:"POST",
            data:{id:id},
            success:function(result){

                var content = "";

                $.each(result,function (index,obj) {
                    content += "<li><p>";
                    content += "<span class='SG_dot'></span>";
                    content += "<a  suda-uatrack='key=blog_btjblog&value=h_btjblog'  target='_blank' href='JavaScript:querySentiment("+obj.aid+")'>";
                    content += "<span name='jjkj'></span>："+obj.aname+"</a";
                    content += "</p><div class='SG_txtc'>";
                    content += "<a  suda-uatrack='key=blog_btjblog&value=h_btjblog' href='http://localhost:3001/view/toView?view=SinaHomePage' target='_blank'>";
                    content += "博客首页</a></div></li>";
                })

                $("#xiangGuan").html(content);

            },
            error:function(){
                alert("失败了");
            }
        })

    }

    var bkcount = 0;
    function querybkcount() {
        var id=$("#ms").val();
        var table=$("#mg").val();
        $.ajax({
            url:"/user/querybkcount",
            type:"POST",
            async:false,
            data:{tablename:table,id:id},
            success:function(obj){
                bkcount = obj.bkcount;
            },
            error:function(){
                alert("失败了");
            }
        })
    }

    function queryXqing(){
        var name=$("#ms").val();

        var table=$("#mg").val();
        $.ajax({
            url:"/boo/queryXqing",
            type:"POST",
            async:false,
            data:{name:name,tablename:table},
            success:function(text){

                console.log(text);
                var count="";
                var authorid = 0;
                var nameid = 0;
                var tablename = "";

                $.each(text,function(index,obj){
                    count+="<br>";
                    count+="<br>";
                    count+="<img src='/js/img/"+obj.photo+"' width='600px'>";
                    count+="<br>";
                    count+="<br>";
                    count+=obj.text;
                    count+="<br>";
                    count+="<br>";
                    count+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a>阅读("+bkcount+")</a>  ";

                    nameid = obj.nameid;
                    tablename = obj.tablename;
                    authorid=obj.authorid;
                })

                if(nameid!=null&&nameid>0){
                    $("#authorId").val(authorid);
                    $("#nameId").val(nameid);
                    addArticleAll(nameid,tablename);
                    queryPingLun(authorid, nameid);
                }

                $("#div").html(count)
            },
            error:function(){
                alert("失败了");
            }
        });
    }

    //添加文章点击量
    function addArticleAll(id,tableName){

        $.ajax({
            url:"/user/addArticleAll",
            type:"get",
            data:{id:id,tableName:tableName},
            success:function(pageUtil){

            },
            error:function(){
                alert("失败了");
            }
        })
    }


    function queryAuthor(id) {
        $.ajax({
            url:"/user/queryAuthor",
            type:"POST",
            data:{id:id},
            success:function(result){
                $("[name='spanname']").html(result.aname);
                $("#mingzi").html("<a href='JavaScript:addASentiment("+id+")'>"+result.aname+"</a>");
                $("#spanfw").html(result.sentiment);
                $("#spanjb").html(result.monthattention);
                $("#spanrq").html(result.attention);
                $("#spanjb2").html(0);

                $("#authorImg").attr("src",result.aimage);
                /*     <li>博客名：<span class="SG_txtc" id="spanname"></span></li>
                        <li>博客访问：<span class="SG_txtc" id="spanfw"></span></li>
                        <li>关注人气：<span class="SG_txtc" id="spanrq"></span></li>
                        <li>获赠金笔：<span class="SG_txtc" id="spanjb"></span></li>
                        <li>赠出金笔：<span class="SG_txtc" id="spanjb2"></span></li>*/

            },
            error:function(){
                alert("失败了");
            }
        })
    }


    //去博主页面
    function querySentiment(id) {
        location.href="/login/toView?viewName=space&id="+id;

    }

    //添加点击量
    function addASentiment(id) {
        location.href="/login/toView?viewName=space&id="+id;

    }


    function queryPingLun(id, nameid) {
        $.ajax({
            type: "get",
            url: "/taren/queryPingLun",
            data: {id: id, nameid: nameid},
            success: function (data) {

                var countent = "";
                var count = 0 //评论条数
                $.each(data, function (index, obj) {
                    count++
                    countent += "<div style='margin-top:10px;background-color: #fff9ec' id='ping" + obj.id + "'>";
                    countent += " <p><img src='" + obj.pingimg + "' width='30'>   <a>" + obj.pingname + "</a>:  " + obj.pingtext + "</p>"
                    countent += "                       <span>" + new Date(obj.createtime).toLocaleDateString();
                    +"</span>"
                    countent += "                        <br>"
                    countent += "                        <br>"
                    countent += "<div  style='float: right;background-color: #fff9ec'><a href=' javascript:showpinghuifu(" + obj.id + ")'>[回复]</a></div>"
                    countent += "<textarea rows='10px' cols='93px' name='huifutext' id='pinghuifu" + obj.id + "' hidden='hidden'>"
                    countent += "</textarea>"
                    countent += "<center><button name='huifupinglun' id='huifupinglun" + obj.id + "' hidden='hidden' onclick='huifupinglun(" + obj.id + "," + obj.pingid + ")'>评论回复</button></center>"
                    countent += "</div>"

                    $.ajax({
                        type: "get",
                        url: "/taren/queryHuiFu",
                        data: {pinglunid: obj.id},
                        success: function (data) {
                            var countent2 = "";
                            $.each(data, function (index, ads) {
                                console.log("回复===>" + data)
                                console.log(data)
                                countent2 += "<div style='margin-left:20px;background-color: #fff9ec'>";
                                countent2 += " <p><img src='" + ads.huifurenimg + "' width='20'>   <a>" + ads.huifurenname + "</a>回复<a>" + ads.pinglunrenname + "</a>:  " + ads.huifutext + "</p>"
                                countent2 += "                       <span>" + new Date(ads.huifutime).toLocaleDateString();
                                +"</span>"
                                countent2 += "    <a href=' javascript:showpinghuifu2(" + ads.id + ")'>[回复]</a>"
                                countent2 += "                        <br>"
                                countent2 += "                        <br>"
                                countent2 += "<textarea rows='10px' cols='93px' name='huifutext' id='pinghuifu2" + ads.id + "' hidden='hidden'>"
                                countent2 += "</textarea>"
                                countent2 += "<center><button name='huifupinglun' id='huifupinglun2" + ads.id + "' hidden='hidden' onclick='huifupinglun2(" + ads.id + "," + ads.huifurenid + ",\"" + ads.huifurenname + "\",\"" + ads.huifurenimg + "\"," + ads.pinglunid + ")'>评论回复</button></center>"
                                countent2 += "</div>"
                            });
                            $("#ping" + obj.id + "").after(countent2)


                        },
                        error: function () {
                            alert("程序有误,请检查")
                        }

                    });
                });
                $("#showpinglun").html(countent);
            },
            error: function () {
                alert("程序有误,请检查")
            }


        })
    }


    function fabu() {
        var nameid=$("#nameId").val();
        var authorId=$("#authorId").val();

        var status = $("#status").val()
        if ($("#userAccout").val() != null && $("#userAccout").val() != "") {

            if (status!=null&&status > 0) {
                $.ajax({
                    type: "post",
                    url: "/taren/addPingLun",
                    data: {
                        authorid: authorId,
                        nameid: nameid,
                        pingid: $("#userid").val(),
                        pingimg: $("#userimg").val(),
                        pingtext: $("#pingtext").val(),
                        pingname: $("#username").val()
                    },
                    success: function (text) {

                        if(text==1){
                            layer.msg("评论包含人身攻击言语,请修正")

                        }

                        queryPingLun(authorId, nameid);
                        $("#pingtext").val("")
                    },
                    error: function () {
                        alert("程序有误,请检查")
                    }

                })
            } else {
                layer.open({
                    title: '警告',
                    content: '管理员禁止了你的发言'
                });
            }
        } else {
            layer.msg("请先登录");
        }
    }

    //回复评论
    function huifupinglun(id, pingid) {
        var nameid=$("#nameId").val();
        var authorId=$("#authorId").val();
        var status = $("#status").val();
        if ($("#userAccout").val() != null && $("#userAccout").val() != "") {

            if (status!=null&&status > 0) {
                $.ajax({
                    type: "post",
                    url: "/taren/addHuiFu",
                    data: {
                        pinglunid: id,
                        pinglunrenid: pingid,
                        huifurenid: $("#userid").val(),
                        huifurenimg: $("#userimg").val(),
                        huifutext: $("#pinghuifu" + id + "").val(),
                        huifurenname: $("#username").val()
                    },
                    success: function (text) {


                        if(text==1){
                            layer.msg("评论包含人身攻击言语,请修正")

                        }
                        queryPingLun(authorId, nameid);
                        $("#pingtext").val("")
                    },
                    error: function () {
                        alert("程序有误,请检查")
                    }

                })
            } else {
                layer.open({
                    title: '警告',
                    content: '管理员禁止了你的发言'
                });
            }
        } else {
            layer.msg("请登录");
        }

    }

    //二级回复评论
    function huifupinglun2(id, huifurenid, huifurenname, huifurenimg, pinglunid) {
        var nameid=$("#nameId").val();
        var authorId=$("#authorId").val();
        if ($("#userAccout").val() != null && $("#userAccout").val() != "") {
            $.ajax({
                type: "post",
                url: "/taren/addHuiFu",
                data: {
                    pinglunid: pinglunid,
                    pinglunrenid: huifurenid,
                    huifurenid: $("#userid").val(),
                    huifurenimg: $("#userimg").val(),
                    huifutext: $("#pinghuifu2" + id + "").val(),
                    huifurenname: $("#username").val()
                },
                success: function (text) {

                    if(text==1){
                        layer.msg("评论包含人身攻击言语,请修正")

                    }

                    queryPingLun(authorId, nameid);
                    $("#pingtext").val("")
                },
                error: function () {
                    alert("程序有误,请检查")
                }

            })
        } else {

            alert("请先登录")
        }

    }

    //二级恢复
    function showpinghuifu2(id) {
        $("[name='huifutext']").hide();
        $("[name='huifupinglun']").hide();
        $("#huifupinglun2" + id + "").show();
        $("#pinghuifu2" + id + "").show();

    }

    function showpinghuifu(id) {
        $("[name='huifutext']").hide();
        $("[name='huifupinglun']").hide();
        $("#huifupinglun" + id + "").show();
        $("#pinghuifu" + id + "").show();
    }



</script>
</html>
